<?php
namespace Admin\Controller;
use Think\Controller;
class IndexController extends CommonController {
    public function index(){
    	$this->display();
    }
	public function copy(){
		$this->display();
	}
	public function user_list(){
		$user=M('user')->select();
		$this->assign('user',$user);
		$this->display();
	}
	/*锁定用户*/
	public function lock(){
		$uid=I('get.uid',null,'intval');
		M('user')->where(array('uid'=>$uid))->save(array('lock'=>1));
		$this->success('锁定成功！');
	}
	/*解锁用户*/
	public function unlock(){
		$uid=I('get.uid',null,'intval');
		M('user')->where(array('uid'=>$uid))->save(array('lock'=>0));
		$this->success('解锁成功！');
	}
	/*删除前台用户*/
	public function del_user(){
		$uid=I('get.uid',null,'intval');
		M('user')->where(array('uid'=>$uid))->delete();
		$this->success('删除成功！');
	}
}